package com.frejoys.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.frejoys.dao.entity.AgentRoleGroup;
import com.frejoys.dao.entity.AgentRoleGroupRatio;

public interface AgentRoleGroupRatioService extends IService<AgentRoleGroupRatio> {

    default AgentRoleGroupRatio getOnly(QueryWrapper<AgentRoleGroupRatio> wrapper) {
        wrapper.last("limit 1");
        return this.getOne(wrapper);
    }

    default AgentRoleGroupRatio getOnly(LambdaQueryWrapper<AgentRoleGroupRatio> wrapper) {
        wrapper.last("limit 1");
        return this.getOne(wrapper);
    }

    // 获取信息
    AgentRoleGroupRatio getInfo(Integer agentRoleGroupId);

}
